package com.semp.gu.ui.elements;

import javax.swing.JTree;
import javax.swing.tree.DefaultTreeCellRenderer;
import javax.swing.tree.TreeSelectionModel;
import com.semp.gu.domain.remote.RemoteGallery;

public class GalleryTree extends JTree {

	/**
	 * 
	 */
	private static final long	serialVersionUID	= -86913389565721760L;

	public GalleryTree(RemoteGallery gallery) {
		super(new GalleryTreeModel(gallery==null?new RemoteGallery("Not Connected"):gallery));
		getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
		setCellRenderer(new DefaultTreeCellRenderer());
	}

}
